import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int num=scan.nextInt();
        }
        System.out.println();
    }
}
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int n=scan.nextInt();
            int m=scan.nextInt();
            int[][] arr=new int[n][m];
            for(int i=0;i<n;i++){
                for(int j=0;j<m;j++){
                    arr[i][j]=scan.nextInt();
                }
            }
            int num=scan.nextInt();
            int sum=scan.nextInt();
            System.out.println(arr[num-1][sum-1]);
        }
    }
}











import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            String[] str=scan.nextLine().split(" ");
            double[] arr=new double[5];
            for(int i=0;i<5;i++){
                arr[i]=Double.parseDouble(str[i]);
            }
            double ans=0;
            for(double n: arr){
                System.out.printf("%.2f\n",n);
                ans+=n;
            }
            System.out.printf("%.2f\n",ans);
        }
    }
}









import java.util.Scanner;
        import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int n=scan.nextInt();
            int m=scan.nextInt();
            int[] arr=new int[n+m];
            for(int i=0;i<n+m;i++){
                arr[i]=scan.nextInt();
            }
            Arrays.sort(arr);
            for(int i=0;i<n+m;i++){
                System.out.print(arr[i]+" ");
            }
        }
    }
}









import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int num=scan.nextInt();
            int[] arr=new int[num];
            for(int i=0;i<num;i++){
                arr[i]=scan.nextInt();
            }
            int k=0;
            for(int i=0;i<num;i++){
                boolean bool=true;
                for(int j=0;j<num;j++){
                    if(arr[i]==arr[j]&&i!=j){
                        arr[j]=0;
                    }
                }
                if(arr[i]!=0){
                    arr[k++]=arr[i];
                }
            }
            for(int i=0;i<k;i++){
                System.out.print(arr[i]+" ");
            }
        }
    }
}












修改数组
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int num=scan.nextInt();
            int[] arr=new int[num];
            int i=0;
            for(i=0;i<num;i++){
                arr[i]=scan.nextInt();
            }
            int x=scan.nextInt();
            int j=0;
            for(i=0;i<num;i++){
                if(arr[i]==x){
                    continue;
                }
                arr[j++]=arr[i];
            }
            for(int k=0;k<j;k++){
                System.out.print(arr[k]+" ");
            }
        }
    }
}
没修改数组，投机取巧的方法
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int num=scan.nextInt();
            int[] arr=new int[num];
            int i=0;
            for(i=0;i<num;i++){
                arr[i]=scan.nextInt();
            }
            int x=scan.nextInt();
            for(i=0;i<num;i++){
                if(arr[i]==x){
                    continue;
                }
                System.out.print(arr[i]+" ");
            }
        }
    }
}














import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int num=scan.nextInt();
            int[] arr=new int[num+1];
            int i=0;
            for(i=0;i<num;i++){
                arr[i]=scan.nextInt();
            }
            int x=scan.nextInt();
            for(i=num-1;i>=0;i--){
                if(arr[i]>=x){
                    arr[i+1]=arr[i];
                }else{
                    arr[i+1]=x;
                    break;
                }
            }
            if(i==-1){
                arr[0]=x;
            }
            for(int j=0;j<num+1;j++){
                System.out.print(arr[j]+" ");
            }
        }
    }
}










import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int num=scan.nextInt();
            int[] arr=new int[num];
            for(int i=0;i<num;i++){
                arr[i]=scan.nextInt();
            }
            int count1=0;
            int count2=0;
            for(int i=0;i<num-1;i++){
                int sub=arr[i+1]-arr[i];
                if(sub>=0){
                    count1++;
                }else{
                    count2++;
                }
            }
            if(count1==(num-1)||count2==(num-1)){
                System.out.println("sorted");
            }else{
                System.out.println("unsorted");
            }
        }
    }
}








import java.util.Scanner;
        import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int num=scan.nextInt();
            int[] arr=new int[num];
            int sum=0;
            for(int i=0;i<num;i++){
                arr[i]=scan.nextInt();
            }
            Arrays.sort(arr);
            sum=arr[num-1]-arr[0];
            System.out.println(sum);
        }
    }
}











import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int num=scan.nextInt();
            int count=0;
            int[] arr=new int[num];
            for(int i=0;i<num;i++){
                arr[i]=scan.nextInt();
                count+=arr[i];
            }
            System.out.println(count);
        }
    }
}












import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int[] arr=new int[10];
            int positive=0;
            int negative=0;
            for(int i=0;i<10;i++){
                arr[i]=scan.nextInt();
                if(arr[i]>0){
                    positive++;
                }else{
                    negative++;
                }
            }
            System.out.println("positive:"+positive);
            System.out.println("negative:"+negative);
        }
    }
}











import java.util.Scanner;
        import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int[] arr=new int[10];
            for(int i=0;i<10;i++){
                arr[i]=scan.nextInt();
            }
            for(int i=9;i>=0;i--){
                System.out.print(arr[i]+" ");
            }
        }
    }
}









import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int[] arr=new int[10];
            for(int i=0;i<10;i++){
                arr[i]=scan.nextInt();
                System.out.print(arr[i]+" ");
            }
        }
    }
}









import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int n=scan.nextInt();
            int m=scan.nextInt();
            int[] arr=new int[n*m];
            int count=0;
            for(int i=0;i<n*m;i++){
                arr[i]=scan.nextInt();
                if(arr[i]>0){
                    count+=arr[i];
                }
            }
            System.out.println(count);
        }
    }
}










import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            String str1=scan.next();
            String str2=scan.next();
            if(str1.contains(str2)){
                System.out.println("same");
            }else{
                System.out.println("different");
            }
        }
    }
}








import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int num=scan.nextInt();
            int[] arr=new int[num+1];
            for(int i=0;i<num;i++){
                arr[i]=scan.nextInt();
            }
            int x=scan.nextInt();
            int i=0;
            for(i=num-1;i>=0;i--){
                if(arr[i]>=x){
                    arr[i+1]=arr[i];
                }else{
                    arr[i+1]=x;
                    break;
                }
            }
            if(i==-1){
                arr[0]=x;
            }
            for(int j=0;j<num+1;j++){
                System.out.print(arr[j]+" ");
            }
        }
    }
}











import java.util.Scanner;
        import java.util.Arrays;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int n=scan.nextInt();
            double[] arr=new double[n];
            double count=0;
            for(int i=0;i<n;i++){
                arr[i]=scan.nextDouble();
                count+=arr[i];
            }
            Arrays.sort(arr);
            double max=arr[n-1];
            double min=arr[0];
            System.out.printf("%.2f ",max);
            System.out.printf("%.2f ",min);
            System.out.printf("%.2f ",(count/n));
        }
    }
}










import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int num=scan.nextInt();
            int count1=0;
            int count2=0;
            if(num%2==0){
                count1=num/2;
                count2=num/2;
            }else{
                count1=num/2+1;
                count2=num/2;
            }
            System.out.println(count1+" "+count2);
        }
    }
}










import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        int count=0;
        for(int i=1;i<2020;i++){
            if(i%10==9||(i/10)%10==9||(i/100)%10==9||(i/1000)%10==9){
                count++;
            }
        }
        System.out.println(count);
    }
}








import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int num=scan.nextInt();
            if(num<0){
                System.out.println("1");
            }else if(num==0){
                System.out.println("0");
            }else{
                System.out.println("-1");
            }
        }
    }
}









import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int num=scan.nextInt();
            if(num%5==0){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }
        }
    }
}










import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        while(scan.hasNext()){
            int a=scan.nextInt();
            int b=scan.nextInt();
            int c=scan.nextInt();
            int d=scan.nextInt();
            System.out.println((a+b-c)*d);
        }
    }
}









import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        System.out.print("I will learn C++ well!");
    }
}










//import java.util.Scanner;
//public class Main {
//    public static void main(String[] args) {
//        Scanner scan=new Scanner(System.in);
//        while(scan.hasNext()){
//            String[] str=scan.nextLine().split(" ");
//            if(str[0].equals("admin")&&str[1].equals("admin")){
//                System.out.println("Login Success!");
//            }else{
//                System.out.println("Login Fail!");
//            }
//        }
//    }
//}








//第一行包含两个整数m和n，表示图像的行数和列数，用单个空格隔开。
// 1≤m≤100, 1≤n≤100。之后m行，每行n个整数0或1，
// 表示第一幅黑白图像上各像素点的颜色，相邻两个数用单个空格隔开。
// 之后m行，每行n个整数0或1，表示第二幅黑白图像上各像素点的颜色，相邻两个数用单个空格隔开。
//import java.util.Scanner;
//public class Main {
//    public static void main(String[] args) {
//        Scanner scan=new Scanner(System.in);
//        int count=0;
//        int num=0;
//        int m=scan.nextInt();
//        int n=scan.nextInt();
//        int[] arr=new int[n*m];
//        for(int i=0;i<n*m;i++){
//            arr[i]=scan.nextInt();
//        }
//        for(int i=0;i<n*m;i++){
//            num=scan.nextInt();
//            if(num==arr[i]){
//                count++;
//            }
//        }
//        System.out.printf("%.2f",count*1.0/(n*m)*100);
//    }
//}